import request from '@/utils/request'
import store from '@/store/index'
const base = require('../../env/index')

// 夹带k_token
function addK_Token(data) {
    var token = {
        k_token: store.getters.k_token
    }
    Object.assign(data, token)
    return data
}
// 分页查询学生信息
export function selectStudent(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/student/infos',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 根据unid查询学生信息
export function selectStudentById(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/student/info/'+data.unid,
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 添加学生学校
export function addStudent(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/student/save',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}
// 添加学生家庭信息
export function addStudentHome(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/student/home/save',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}
// 添加招生信息
export function addStudentRecruit(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/student/recruit/save',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}
// 添加学生学业
export function addStudentCourse(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/student/course/save',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}
// 删除学生信息
export function delStudent(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/student/delete/'+data.unid,
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}
// 添加跟进
export function addFollow(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/follow/save',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 查询数据字典类栏目
export function queryDictionaries(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/data/cate/getCate',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 查询数据字典数据
export function queryDictionariesData(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/data/project/infos',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 添加数据字典数据
export function addDictionariesData(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/data/project/save',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 删除数据字典数据
export function delDictionariesData(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/data/project/delete/'+data.unid,
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 添加栏目类别
export function addDictionariesType(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/data/cate/save',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 删除数据字典栏目
export function delDictionariesType(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/data/cate/delete/'+data.unid,
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 教材信息录入
export function addTeach(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/textbook/save',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 知识点录入
export function addKnowledge(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/textbook/saveKnow',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 分页查询教材信息
export function queryTeach(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/textbook/getInfos',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 根据unid查询教材信息
export function queryTeachById(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/textbook/getInfo',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 添加学期
export function addSemester(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/semester/save',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 查询学期
export function querySemesterData(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/semester/infos',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 侧边栏所有数据
export function queryTimetable(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/timetable/infos',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 根据unid获取时间表名字
export function queryTimetableById(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/timetable/info/'+data.unid,
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 添加时间表名字
export function addTimetable(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/timetable/save',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 添加详细时间表
export function addTimetableMain(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/timetable/main/save',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 查询收费课程
export function queryPayLession(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/pay/lession/infos',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 查询收费课程
export function selectPayLession(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/pay/lession/infos',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 查询学期信息
export function querySemesterList(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/pay/lession/semesterList',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 查询学期信息
export function queryLessionList(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/pay/lession/lessionList',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 获取所有收费项目
export function getPayItem(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/pay/lession/getPayItem',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 添加课程
export function addLession(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/lession/save',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 根据unid获取课程
export function queryLessionById(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/lession/info/'+data.unid,
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 添加收费课程
export function addPayLession(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/pay/lession/save',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 分页查询其他收费项
export function queryPayItem(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/pay/item/infos',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 添加其他收费项
export function addPayItem(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/pay/item/save',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 分页查询修复系统
export function queryMatter(data) {
  return request({
    url: base.Matter_url + '/api/v1/admin/repair/infos',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 审核通过接口
export function editAdopt(data) {
  return request({
    url: base.Matter_url + '/api/v1/admin/repair/audit',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 获取所有创建人
export function querycreateor(data) {
  return request({
    url: base.Matter_url + '/api/v1/admin/repair/createor',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 退回题目
export function queryNoaudit(data) {
  return request({
    url: base.Matter_url + '/api/v1/admin/repair/noaudit',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 分页查询选择题
export function queryChose(data) {
  return request({
    url: base.Matter_url + '/api/v1/admin/choice/infos',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 修改题目
export function updateChose(data) {
  return request({
    url: base.Matter_url + '/api/v1/admin/choice/save',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 更新库存 -教材信息
export function addUpdate(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/textbook/update/'+data.unid,
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 分页查询 - 收费列表栏目(PayCate)列表
export function queryPayCate(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/pay/cate/infos',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 分页查询 - 班级表(Clbum)列表
export function queryClbum(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/clbum/infos',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 获取老师信息 - 班级表
export function queryTeacher(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/clbum/teacher/list',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 获取收费课程信息 - 班级表
export function queryPay(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/clbum/lession/list',
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 回收站 -教材信息
export function delTeach(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/textbook/delInfo/'+data.unid,
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}

// 获取信息 - 时间表名字(Timetable)主键
export function queryByIdTimetable(data) {
  return request({
    url: base.Student_url + '/api/v1/admin/timetable/info/'+data.unid,
    method: 'POST',
    headers: {},
    data: addK_Token(data)
  })
}
